{{extend './layout/layout.html'}}
{{block 'head'}}
<link rel="stylesheet" href="/public/css/header.css">
<link rel="stylesheet" href="/public/css/my.css">
{{/block}}
{{block 'content'}}
<!-- 引入头部 -->
{{include './component/web-header.html'}}
<!-- body start-->
<div class="container">
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item active" aria-current="page">首页</li>
    </ol>
</nav>
{{if user}}
<a class="btn btn-success" href="/new?id={{user.id}}" role="button">发布Blog</a>
{{/if}}
{{each notes}}
<div class="card mt-4">
    <div class="card-body">
        <h4 class="card-title"><a href="/show?id={{$value.id}}">{{$value.title}}</a></h4>
        <div class="card-text mb-2">{{$value.description}}</div>
        <div class="btn-box">
            <small class="card-subtitle text-muted mb-2 mr-2">
                <i class="bi bi-person"></i>
                {{$value.userId}}
            </small>
            <small class="card-subtitle text-muted mb-2 mr-2">
                <i class="bi bi-calendar-week-fill"></i>
                {{$value.createTime.toLocaleDateString()}}
            </small>
            <small class="card-subtitle text-muted mb-2 mr-2"><i class="bi bi-tags"></i>{{$value.type}}</small>
        </div>
    </div>
</div>
{{/each}}
</div>
<!-- body end -->
{{/block}}

{{block 'script'}}
{{/block}}